"""import pygame
import time
import random
block_w=60
N=10   #N=blocks
c_x=block_w*N/2
c_y=block_w*N/2
c_r=(block_w-6)//2

pygame.init()
screen=pygame.display.set_mode([block_w*N,block_w*N])
screen.fill([255,255,255])

def drawing():
    pygame.display.flip()

#pygame.draw.rect(screen,[125,125,125],[i*block_w,j*block_w,block_w,block_w],1)
#pygame.draw.circle(screen, [255,0,0], [c_x,c_y], c_r)

map1=[[5,5],[1,1,1,1,1],
[1,0,0,0,1],
[1,0,0,0,1],
[1,0,0,0,1],
[1,1,1,1,1]
]

def drawmap1(map1,x,y,b,n):
    i=map[0][0]
    j=map[0][1]
    print(i,j)
    m=0
    n=0
    while m*n<i*j:
        x1=map[m+1][0]
        if x1==0:
            pygame.draw.rect(screen,[0,225,0],[x+,j*block_w,1,block_w],1)
        if x1==1:
            pygame.draw.rect(screen,[125,125,125],[i*block_w,j*block_w,1,block_w],1)

def is_out_range(c_x,c_y):
    if c_x<=0 or c_x>=block_w*N:
        return True
    if c_y<=0 or c_y>=block_w*N:
        return True
    return False

running=True
while running:
    for event in pygame.event.get():
        # print(event)
        if event.type == pygame.QUIT:
            running=False
        elif event.type == pygame.KEYDOWN:
            c_x_old=c_x
            c_y_old=c_y
            # print(event.key)
            if event.key == pygame.K_UP:
                print("向上")
                if not is_out_range(c_x,c_y-1*block_w):                            
                    c_y-=block_w*3
            elif event.key == pygame.K_DOWN:
                print("向下")
                if not is_out_range(c_x,c_y+1*block_w):                            
                    c_y+=1*block_w*2
            elif event.key == pygame.K_LEFT:
                print("向左")
                if not is_out_range(c_x-1*block_w,c_y):                            
                    c_x-=1*block_w*2
            elif event.key == pygame.K_RIGHT:
                print("向右")
                if not is_out_range(c_x+1*block_w,c_y):                            
                    c_x+=1*block_w*3
            pygame.draw.circle(screen, [255,255,255], [c_x_old,c_y_old], c_r)
            boo(c_x_old-(block_w/2),c_y_old-(block_w/2))
            pygame.draw.circle(screen, [255,0,0], [c_x,c_y], c_r)
            pygame.display.flip()

pygame.quit()'"""